﻿
namespace ParaEditor.DomainSource.Entities
{
    public class OwnerInfoPk
    {
        public virtual int algVer { get; set; }
        public virtual int ownerId { get; set; }

        /// <summary>
        /// 判断两个对象是否相同，这个方法需要重写
        /// </summary>
        /// <param name="obj">进行比较的对象</param>
        /// <returns>真true或假false</returns>
        public override bool Equals(object obj)
        {
            if (obj is OwnerInfoPk)
            {
                OwnerInfoPk pk = obj as OwnerInfoPk;
                if (this.algVer == pk.algVer
                     && this.ownerId == pk.ownerId)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            return false;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}
